<?php
/* @var $this DeliveryReceiptDetailsController */
/* @var $model DeliveryReceiptDetails */

$this->breadcrumbs=array(
	'Delivery Receipt Details'=>array('index'),
	$model->id,
);

$this->menu=array(
    array('label'=>'Back to Delivery Receipt', 'url'=>array('/DeliveryReceipt/view', 'id'=>$model->delivery_receipt_id)),

	

	array('label'=>'List DeliveryReceiptDetails', 'url'=>array('index')),
	array('label'=>'Create DeliveryReceiptDetails', 'url'=>array('create')),
	array('label'=>'Update DeliveryReceiptDetails', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete DeliveryReceiptDetails', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage DeliveryReceiptDetails', 'url'=>array('admin')),
	);
	

?>

<h1>View Delivery Receipt Details</h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		
		'delivery_receipt_id',
		array('label'=>'Item', 'value'=>$model->item->item_desc),
		array('label'=>'Qty', 'value'=>$model->qty .' '. $model->item->unit),
		array('label' => 'Amount', 'value' => 'Php '. $model->qty * $model->item->unit_price ),
	),
)); ?>

<?php $en=deliveryReceiptDetails::model()->findAll('id = :a', array(':a'=>$model->id));?>
	<?php if (count($en) !== 0){?>
	<br>
	<h2>Item</h2>
	<?php foreach ($en as $row) { ?>
		<?php echo CHtml::link ( 'Update', array('item/update', 'id'=>$row->item_id)); ?>
			<?php $this->widget ('zii.widgets.CdetailView', array('data'=>$row,'attributes'=>array(
	       array('label'=>'Item Description' , 'value'=>$row->item->item_desc),
		   array('label'=>'Category' , 'value'=>$row->item->category),
			array('label'=>'Brand' , 'value'=>$row->item->brand),
			array('label'=>'Code' , 'value'=>$row->item->item_code),
			array('label'=>'Color' , 'value'=>$row->item->color),
			array('label'=>'Unit' , 'value'=>$row->item->unit),
			array('label'=>'Unit Price' , 'value'=>  'Php '. $row->item->unit_price),),));?><br>


	<?php }} ?>
